package com.gather.treesets;

import java.util.HashMap;
import java.util.Set;

public class Example05 {
    public static void main(String[] args) {
        System.out.println("Map初体验");

        HashMap<String, String> map = new HashMap<>();
        map.put("name","yemingbao");
        System.out.println(map.get("name"));
        map.put("age","25岁");
        map.put("phone","123213");
        map.put("name","hahhaha");

        // Map 集合循环
        Set<String> strings = map.keySet();
        System.out.println("strings "+strings);// strings[phone, name, age]
        for (String string : strings) {
            System.out.println(map.get(string));
        }
    }
}
